/**
 * bootstrap rating plugins
 */
(function() {
	'use strick',
	
	require.config({
		paths: {
			"bootstrap.rating": "bootstrap/extends/bootstrap-rating/3.5.7/js/star-rating.min",
			"bootstrap.rating.zh-CN": "bootstrap/extends/bootstrap-rating/3.5.7/js/star-rating_locale_zh-CN"
		},
		shim: {
			"bootstrap.rating": {
				deps : [
				   "jquery", 
				   "css!bootstrap/extends/bootstrap-rating/3.5.7/css/star-rating.min.css"
				],
				exports:"jQuery.fn.rating"
			},
			"bootstrap.rating.zh-CN": {deps : ["bootstrap.rating"]}
		}
	});
	
	define(['bootstrap.rating','bootstrap.rating.zh-CN'], function(){
		return {
			register:function(elem, options){
				jQuery(elem).rating(jQuery.extend({step:1, size:'xs', showClear:false, showCaption:false}, options));
			}
		}
	});
})(this);
